package Chapter05.Cars;

//轿车
public class Car extends MotoVehicle {


    public Car(String brand, String plate, String type, int seatnum, int dayrent, boolean state) {
        super(brand, plate, type, seatnum, dayrent, state);
    }

    @Override
    public int money(int days) {
        int sum = 0;
        sum = getDayrent() * days;
        if (days > 7 && days < 30) {
            sum *= 0.9;
        } else if (days >= 30 && days <= 150) {
            sum *= 0.8;
        } else if (days >= 150) {
            sum *= 0.7;
        }
        return sum;
    }


}
